﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DLL;
using PagedList;

namespace BLL
{
    public class ReturnProductService
    {
        private ReturnProductRepo m_Repo;

        public ReturnProductService()
        {
            m_Repo = new ReturnProductRepo();
        }

        public bool AddReturnProduct(ReturnProduct returnProduct, List<ReturnProductDetail> details)
        {
            return m_Repo.AddReturnProduct(returnProduct, details);
        }

        public bool AddReturnProductWithBill(ReturnProduct returnProduct, List<ReturnProductDetail> details)
        {
            return m_Repo.AddReturnProductWithBill(returnProduct, details);
        }

        public List<pSearchReturnProduct_Result> Search(DateTime fromDate, DateTime toDate)
        {
            return m_Repo.Search(fromDate, toDate);
        }

        public List<pGetReturnProductDetailByReturnProductId_Result> GetDetailById(int returnProductId)
        {
            return m_Repo.GetDetailById(returnProductId);
        }

        public pGetTotalReturnPrice_Result GetTotalReturn(DateTime fromDate, DateTime toDate)
        {
            return m_Repo.GetTotalReturn(fromDate, toDate);
        }
    }
}
